<?php  
    class RouteController extends Controller{
			
		 public function accessRules()
		{
			return array(
				array(
					'allow',  // allow all users to access 'index' and 'view' actions.
					'expression'=>'$user->rights>=1',
				),
				array(
					'deny',  // deny all users
					'users'=>array('*'),
					'message'=>'You do not have access to this page ! ! ',
				),
			);
		}
	  	
		public function actionIndex(){
		    
			if(Yii::app()->user->rights === '1'){
				
				$this->redirect(array('stubasicinfo/index'));
				
			}else{
				
				$this->redirect(array('basicinfo/index'));
				
			}
		
		}
  }
		
?>		